import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;

public class demo {
    public static void main(String[] args) {
        long l = System.nanoTime();
        long l2 = System.currentTimeMillis();
        List<String> la = new ArrayList<>();
        la.add("s1s");
        la.add("s3s");
        la.add("s4s");
        la.add("s6s");
        la.add("s7s");
        for(Iterator<String> ite = la.iterator(); ite.hasNext();){
            String str = ite.next();
            System.out.println(str);
            if(str.contains("3")){
                ite.remove();
            }
        }
        System.out.println("--------------------");
        for (String s : la) {
            System.out.println(s);
        }
        long l1 = System.nanoTime();
        long l3 = System.currentTimeMillis();
        Double d = Double.valueOf(l1-l);
        System.out.println((d/1000000)+
                "/"+(l3-l2));
    }
}
